public class Test2 {
    public static void main(String[] args) {
//        Demo2.show1(new Inter1Impl1());
//        Demo2.show1(new Inter1Impl1());
//        Demo2.show1(new Inter1Impl1());

        Demo2.show1(()-> System.out.println("hello"));

        Demo2.show1(()-> System.out.println("world"));

    }
}


interface Inter1{
    public abstract void fun1();
}

class Demo2{
    public static void show1(Inter1 inter1){
        inter1.fun1();
    }
}